package com.hd.utils;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.util.WebUtils;

public class RequestUtils {
	
	public static Cookie getCookie(HttpServletRequest request, String cookieName){
		return WebUtils.getCookie(request, cookieName);
	}
	
	public static void removeCookie(HttpServletResponse response, String cookieName){
		Cookie cookie = new Cookie(cookieName,null);
		cookie.setMaxAge(0);
		cookie.setPath("/");
		response.addCookie(cookie);
	}
}
